//================v1要点总结===============
/**
 * 1. 利用无符号为右移，每次跟1进行与操作，然后累加
 */

/**
 * @param {number} n - a positive integer
 * @return {number}
 */
var hammingWeight = function (n) {
    let count = 0
    while (n > 0) {
        count += n & 1
        n = n >>> 1;
    }
    return count
};

// eslint-disable-next-line no-octal
console.log(hammingWeight(4294967293));
Number.parseInt()